package logic

import (
	"context"
	"yuekaoHouse/house_srv/model/redis"

	"yuekaoHouse/house_srv/house"
	"yuekaoHouse/house_srv/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type DelSmsCodeLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewDelSmsCodeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DelSmsCodeLogic {
	return &DelSmsCodeLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *DelSmsCodeLogic) DelSmsCode(in *house.DelSmsCodeRequest) (*house.DelSmsCodeResponse, error) {
	// todo: 销毁短信验证码

	redis.RedisDelSmsCode(in.Mobile, in.Sale)

	return &house.DelSmsCodeResponse{}, nil
}
